<% @page_title = "Search results for: #{@term}" %>
<% @blurb = '' %>

<div class="body column prepend-1 span-22 append-1 last">
  <h3>Search results for: "<%=h @term %>"</h3>

  <% if @profiles.size == 0 && @disciplines.size == 0 && @articles.size == 0 && @discussions.size == 0 %>
    <p>We found nothing matching "<%=h @term %>."  Please search again, or browse
        <%= link_to( 'Members', profiles_path ) %>,
        <%= link_to( 'Disciplines', disciplines_path ) %>, or
        <%= link_to( 'Articles', articles_list_path ) %>.
    </p>
  <% end %>

  <%= render :partial => 'layouts/search', :locals => { :label => 'Search again', :size => 30 } %>
</div>

<div class="search_results">
  <%= render :partial => 'content_type', :locals => {
    :label => 'Profiles',
    :partial => 'profiles/profile',
    :collection => @profiles
  } %>

  <%= render :partial => 'content_type', :locals => {
    :label => 'Disciplines',
    :partial => 'disciplines/discipline',
    :collection => @disciplines
  } %>

  <%= render :partial => 'content_type', :locals => {
    :label => 'Articles',
    :partial => 'articles/article',
    :collection => @articles
  } %>

  <%= render :partial => 'content_type', :locals => {
    :label    => 'Discussions',
    :partial  => 'discussions/discussion',
    :collection => @discussions
  } %>
</div>
